package com.hpu.constants;

/**
 * 封装了接口常量
 * @author Administrator
 *
 */
public class UrlConstants {
	
	public static final String INTERFACE_KEY="0e252616229cf190376bf954c8e7ade7";
	
	public static final String INTERFACE_BASEURL="https://hpuxiaoyuan.com/hpu/";
	
	public static final String INTERFACE_UPLOAD_HEAD_IMAGE=INTERFACE_BASEURL+"index.php?p=front&c=Info&a=API_uploadPersonalImg&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_GET_IMAGEPATH=INTERFACE_BASEURL+"index.php?p=front&c=Info&a=API_getPersonalImg";

	//检查版本
	public static final String INTERFACE_CHECK_VERSION=INTERFACE_BASEURL+"index.php?p=front&c=Android&a=API_getLastedApkInfo&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_LOG_UPLOAD=INTERFACE_BASEURL+"index.php?p=front&c=Android&a=API_uploadAndroidErrorLog&key="+INTERFACE_KEY;
	
	/**
	 * 接口：周次校准
	 */
	public static final String INTERFACE_UPDATE_WEEK=INTERFACE_BASEURL+"index.php?p=front&c=Class&a=API_getCurWeek&key="+INTERFACE_KEY;

	/**
	 * 接口：课程
	 */
	public static final String INTERFACE_COURSE=INTERFACE_BASEURL+"index.php?p=front&c=Class&a=API_getClassInfo&key="+INTERFACE_KEY;

	/**
	 * 接口：个人信息
	 */
	public static final String INTERFACE_INFO=INTERFACE_BASEURL+"index.php?p=front&c=Info&a=API_getPersonalInfo&key="+INTERFACE_KEY;
	
	/**
	 * 接口：期末成绩
	 */
	public static final String INTERFACE_SCORE=INTERFACE_BASEURL+"index.php?p=front&c=Score&a=API_getCurScore&key="+INTERFACE_KEY;
	
	/**
	 * 接口：历年成绩
	 */
	public static final String INTERFACE_ALLSCORE=INTERFACE_BASEURL+"index.php?p=front&c=Score&a=API_getEverScore&key="+INTERFACE_KEY;
	
	/**
	 * 接口：不及格成绩
	 */
	public static final String INTERFACE_FAILSCORE=INTERFACE_BASEURL+"index.php?p=front&c=Score&a=API_getFailScore&key="+INTERFACE_KEY;
	
	/**
	 * 接口：获取任选课汇总
	 */
	public static final String INTERFACE_OPTIONAL_CLASS=INTERFACE_BASEURL+"index.php?p=front&c=Class&a=API_getOptionalClass&key="+INTERFACE_KEY;
	
	/**
	 * 接口：最新公告
	 */
	public static final String INTERFACE_SCHOOL_NOTICE=INTERFACE_BASEURL+"index.php?p=front&c=Notice&a=API_getSchoolNotice&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_XUEYUAN_NOTICE=INTERFACE_BASEURL+"index.php?p=front&c=Notice&a=API_getDepNotice&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_SCHOOL_NEWS=INTERFACE_BASEURL+"index.php?p=front&c=News&a=API_getSchoolNews&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_XUEYUAN_NEWS=INTERFACE_BASEURL+"index.php?p=front&c=News&a=API_getDepNews&key="+INTERFACE_KEY;
	
	public static final String INTERFACE_SCAN=INTERFACE_BASEURL+"index.php?p=front&c=Login&a=qrScanInsert";
	
	public static final String INTERFACE_LECTURE=INTERFACE_BASEURL+"index.php?p=front&c=Lecture&a=API_getLecture&key="+INTERFACE_KEY;
	
	/**
	 * 分享课程上传
	 */
	public static final String INTERFACE_UPLOAD_SHARECOURSE=INTERFACE_BASEURL+"index.php?p=front&c=Class&a=API_uploadShareClass&key="+INTERFACE_KEY;
	
	/**
	 * 分享课程下载
	 */
	public static final String INTERFACE_DOWNLOAD_SHARECOURSE=INTERFACE_BASEURL+"index.php?p=front&c=Class&a=API_getShareClass&key="+INTERFACE_KEY;


	public static final String INTERFACE_BODY_TEST=INTERFACE_BASEURL+"index.php?p=front&c=BodyTest&a=API_getBodyTestInfo&key="+INTERFACE_KEY;


	public static final String INTERFACE_BORROW=INTERFACE_BASEURL+"index.php?p=front&c=Lecture&a=API_getLecture&key="+INTERFACE_KEY;

	public static String getBookBorrowDetail(String id){
		return INTERFACE_BASEURL+"index.php?p=front&c=Library&a=API_getAvaliableInfo&id="+id+"&key="+INTERFACE_KEY;
	}

	/**
	 * 获取登录的URL
	 * @param number 学号
	 * @param pw1 vpn密码
	 * @param pw2 教务处密码
	 * @return
	 */
	public static String getLoginUrl(String number,String pw1,String pw2){
		return INTERFACE_BASEURL+"index.php?p=front&c=Login&a=API_landing&key="+INTERFACE_KEY;
	}
	
	public static String getBookUrl(String name,String page){
		return INTERFACE_BASEURL+"index.php?p=front&c=Library&a=API_getBooksInfo&key="+INTERFACE_KEY+"&name="+name+"&page="+page;
	}
	
	/**
	 * 返回查询教室的接口地址
	 * @param building
	 * @return
	 */
	public static String getRoomUrl(String building){
		return INTERFACE_BASEURL+"index.php?p=front&c=Classroom&a=API_getBuildingEmpty&key="+INTERFACE_KEY+"&building="+building;
	}
	
	/**
	 * 获取最新公告下载的地址
	 * @return
	 */
	public static String getNoticeDownlaodUrl(){
		return INTERFACE_BASEURL+"index.php?p=front&c=Notice&a=API_downloadSchoolNotice&key="+INTERFACE_KEY;
	}

	public static String getElectricity(String target){
		return INTERFACE_BASEURL+ "index.php?p=front&c=Electricity&a=API_getElectricityDetail&target="+target+"&key="+INTERFACE_KEY;
	}

}
